<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><#if op??><#if op="view">查看<#elseif op="edit">修改</#if><#else>新增</#if>品牌分类</title>
	<link href="/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div class="place">
    	<span>位置：</span>
	    <ul class="placeul"><li><a href="/index.html">首页</a></li><li><#if op??><#if op="view">查看<#elseif op="edit">修改</#if><#else>新增</#if>品牌分类</li></ul>
    </div>
    <br><br>
	<form action="/ware/catBrand/save.html" method="post">
		<input name="id" type="hidden" value="${(catBrand.id)!""}">
	    <ul class="forminfo">
		    <li>
		    	<label>品牌名称：</label>
				<input id="brandName" name="brandName" type="hidden" value="<#if (catBrand.brandName)??>${(catBrand.brandName)!""}<#elseif brandAll?if_exists && brandAll?size gt 0>${brandAll[0].name}</#if>">
		    	<select class="select-form" id="brandId" name="brandId" <#if op?? && op="view">disabled=true</#if>>
				    <#if brandAll??><#list brandAll as item>
				    <option value=${item.id} <#if (catBrand.brandId)?? && (catBrand.brandId)?number == item.id>selected="selected"</#if>>${item.name}</option>
				    </#list></#if>
			    </select>
		    	<i><font class="font-red">*</font>请选择要分类的品牌，<a href="/ware/brand/add.html">新增品牌</a></i>
		    </li>
		    <li>
		    	<label>分类名称：</label>
				<input id="catName" name="catName" type="hidden" value="${(catBrand.catName)!""}">
		    	<select class="select-form" id="catId" name="catId" <#if op?? && op="view">disabled=true</#if>>
				    <option value="">选择所属分类</option>
				    <#if categoryAll??><#list categoryAll as item>
				    <option value=${item.id} <#if (catBrand.catId)?? && (catBrand.catId)?number == item.id>selected="selected"</#if>>${item.name}</option>
				    </#list></#if>
			    </select>
		    	<i><font class="font-red">*</font>选择品牌所属分类，<a href="/ware/category/add.html">新增分类</a></i>
		    </li>
		    <li>
		    	<label>是否关闭：</label>
		    	<input name="status" type="radio" value="1" selected="selected" <#if op?? && op="view">disabled=true</#if> autocomplete="off">打开&ensp;<input name="status" type="radio" value="2" <#if op?? && op="view">disabled=true</#if> autocomplete="off">关闭
		    	<i><font class="font-red">*</font>选择关闭后，此品牌不会在对应的分类下显示。此时不管对应的品牌的状态。</i>
		    </li>
		    <li>
		    	<label>&nbsp;</label>
		    	<#if !op?? || op!="view">
		    	<input id="submitBtn" type="button" class="btn" value="提交"/>&emsp;
		    	</#if>
		    	<input id="cancelBtn" type="button" class="btn" value="返回"/>
		    </li>
	    </ul>
	</form>
</body>
<script type="text/javascript" src="/js/jquery-1.10.1.min.js"></script>
<link href="/js/ext/easyform/easyform.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/ext/easyform/easyform.js"></script>
<script type="text/javascript" src="/js/commonAdd.js"></script>
<script>
	selectChangeValue("brandId", "brandName");
	selectChangeValue("catId", "catName");
</script>
</html>